<?php
/**
 *  Wrapper for Zend_Log that logs workflow events.
 * @author dengdl
 *
 */
class Workflow_Execution_EventLogListener implements Workflow_Execution_Listener
{
	/**
	 * Zend_Log instance to be used.
	 * @var Zend_Log
	 */
	protected $log;
	
	/**
	 *  Construct a new event log listener.
	 * @param Zend_Log $log
	 */
	public function __construct( Zend_Log $log )
    {
        $this->log = $log;
    }
	
	/**
     * Called to inform about events.
     *
     * @param string  $message
     * @param int $type
     */
    public function notify( $message, $type = Workflow_Execution_Listener::INFO )
    {
        $this->log->log( $message, $type );
    }
}
?>